home *** CD-ROM | disk | FTP | other *** search
/ PC Plus SuperCD (UK) 1999 January / PC Plus Super CD No55a (PCP-147A-1-99) (Disc 1) (1998).iso / linux / developers / visualtcl / windows / vtcl / lib / help.tcl < prev    next >
Encoding:
Text File  |  1997-04-09  |  3.0 KB  |  81 lines

  1. ##############################################################################
  2. # $Id: help.tcl,v 1.3 1997/04/09 13:13:02 stewart Exp $
  3. #
  4. # help.tcl - help dialog
  5. #
  6. # Copyright (C) 1996-1997 Stewart Allen
  7. #
  8. # This program is free software; you can redistribute it and/or
  9. # modify it under the terms of the GNU General Public License
  10. # as published by the Free Software Foundation; either version 2
  11. # of the License, or (at your option) any later version.
  12. #
  13. # This program is distributed in the hope that it will be useful,
  14. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  16. # GNU General Public License for more details.
  17. #
  18. # You should have received a copy of the GNU General Public License
  19. # along with this program; if not, write to the Free Software
  20. # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  21.  
  22. ##############################################################################
  23. #
  24.  
  25. proc vTclWindow.vTcl.help {args} {
  26.     global vTcl
  27.     set base .vTcl.help
  28.     if {[winfo exists .vTcl.help]} {
  29.         wm deiconify .vTcl.help; return
  30.     }
  31.     toplevel .vTcl.help -class Toplevel
  32.     wm transient .vTcl.help .vTcl
  33.     wm focusmodel .vTcl.help passive
  34.     wm geometry .vTcl.help 497x425
  35.     wm maxsize .vTcl.help 1137 870
  36.     wm minsize .vTcl.help 1 1
  37.     wm overrideredirect .vTcl.help 0
  38.     wm resizable .vTcl.help 1 1
  39.     wm deiconify .vTcl.help
  40.     wm title .vTcl.help "Help for Visual Tcl"
  41.     frame .vTcl.help.fra18 \
  42.         -borderwidth 1 -height 30 -relief raised -width 30 
  43.     text .vTcl.help.fra18.tex22 \
  44.         -height 15 -width 80 \
  45.         -xscrollcommand {.vTcl.help.fra18.scr23 set} \
  46.         -yscrollcommand {.vTcl.help.fra18.scr24 set} -wrap none
  47.     scrollbar .vTcl.help.fra18.scr23 \
  48.         -command {.vTcl.help.fra18.tex22 xview} -orient horiz -width 10 
  49.     scrollbar .vTcl.help.fra18.scr24 \
  50.         -command {.vTcl.help.fra18.tex22 yview} -orient vert -width 10 
  51.     frame .vTcl.help.fra20 \
  52.         -borderwidth 1 -height 30 -relief sunken -width 30 
  53.     button .vTcl.help.fra20.but21 \
  54.         -command {
  55.             wm withdraw .vTcl.help
  56.         } -highlightthickness 0 -padx 9 -pady 3 \
  57.         -text Done 
  58.     pack .vTcl.help.fra18 \
  59.         -anchor center -expand 1 -fill both -padx 5 -pady 5 -side top 
  60.     grid columnconf .vTcl.help.fra18 0 -weight 1
  61.     grid rowconf .vTcl.help.fra18 0 -weight 1
  62.     grid .vTcl.help.fra18.tex22 \
  63.         -column 0 -row 0 -columnspan 1 -rowspan 1 -sticky nesw 
  64.     grid .vTcl.help.fra18.scr23 \
  65.         -column 0 -row 1 -columnspan 1 -rowspan 1 -sticky ew 
  66.     grid .vTcl.help.fra18.scr24 \
  67.         -column 1 -row 0 -columnspan 1 -rowspan 1 -sticky ns 
  68.     pack .vTcl.help.fra20 \
  69.         -anchor center -expand 0 -fill x -padx 5 -pady 5 -side top 
  70.     pack .vTcl.help.fra20.but21 \
  71.         -anchor center -expand 1 -fill both -padx 2 -pady 2 -side top 
  72.  
  73.     catch {
  74.         set f [open [file join $vTcl(VTCL_HOME) README] r]
  75.         .vTcl.help.fra18.tex22 insert end [read $f]
  76.         close $f
  77.     }
  78.     .vTcl.help.fra18.tex22 conf -state disabled
  79. }
  80.  
  81.